home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
CIncludes
/
PCIKernel.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-05-01
|
4KB
|
136 lines
/*
File: PCIKernel.h
Contains: All definitions, prototypes, and constants for the PCI Family.
Version: Technology: xxx put the technology version here xxx
Release: Universal Interfaces 3.0d3 on Copland DR1
Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
Bugs?: If you find a problem with this file, send the file and version
information (from above) and the problem description to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
*/
#ifndef __PCIKERNEL__
#define __PCIKERNEL__
#ifndef __TYPES__
#include <Types.h>
#endif
#ifndef __SYNCHRONIZATION__
#include <Synchronization.h>
#endif
#ifndef __NAMEREGISTRY__
#include <NameRegistry.h>
#endif
#ifndef __INTERRUPTS__
#include <Interrupts.h>
#endif
#ifndef __IOITERATOR__
#include <IOIterator.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import on
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
#if FOR_SYSTEM8_PREEMPTIVE
typedef LogicalAddress PCIConfigAddress;
typedef LogicalAddress PCIIOAddress;
extern OSStatus PCIConfigReadByte(RegEntryRef *entry, PCIConfigAddress configAddr, UInt8 *value);
extern OSStatus PCIConfigReadWord(RegEntryRef *entry, PCIConfigAddress configAddr, UInt16 *value);
extern OSStatus PCIConfigReadLong(RegEntryRef *entry, PCIConfigAddress configAddr, UInt32 *value);
extern OSStatus PCIConfigWriteByte(RegEntryRef *entry, PCIConfigAddress configAddr, UInt8 value);
extern OSStatus PCIConfigWriteWord(RegEntryRef *entry, PCIConfigAddress configAddr, UInt16 value);
extern OSStatus PCIConfigWriteLong(RegEntryRef *entry, PCIConfigAddress configAddr, UInt32 value);
extern OSStatus PCIIOReadByte(RegEntryRef *entry, PCIIOAddress ioAddr, UInt8 *value);
extern OSStatus PCIIOReadWord(RegEntryRef *entry, PCIIOAddress ioAddr, UInt16 *value);
extern OSStatus PCIIOReadLong(RegEntryRef *entry, PCIIOAddress ioAddr, UInt32 *value);
extern OSStatus PCIIOWriteByte(RegEntryRef *entry, PCIIOAddress ioAddr, UInt8 value);
extern OSStatus PCIIOWriteWord(RegEntryRef *entry, PCIIOAddress ioAddr, UInt16 value);
extern OSStatus PCIIOWriteLong(RegEntryRef *entry, PCIIOAddress ioAddr, UInt32 value);
extern OSStatus PCIIntAckReadByte(RegEntryRef *entry, UInt8 *value);
extern OSStatus PCIIntAckReadWord(RegEntryRef *entry, UInt16 *value);
extern OSStatus PCIIntAckReadLong(RegEntryRef *entry, UInt32 *value);
extern OSStatus PCISpecialCycleWriteLong(RegEntryRef *entry, UInt32 value);
extern OSStatus PCISpecialCycleBroadcastLong(UInt32 value);
/* IOIteration model definitions for the PCI Family*/
struct PCIIOIteratorData {
IOCommonInfo IOCI;
char Name[32];
UInt32 Domain;
UInt32 BusNumber;
UInt32 ConfigAddress;
};
typedef struct PCIIOIteratorData PCIIOIteratorData;
/* get all pci device found*/
extern OSStatus PCIGetDeviceData(ItemCount requestItemCount, ItemCount *totalItemCountPtr, PCIIOIteratorData *List);
/* get all pci device by a certain name*/
extern OSStatus PCINameGetDeviceData(char *Name, ItemCount reqeustItemCount, ItemCount *totalItemCountPtr, PCIIOIteratorData *List);
/* get all pci device belonging to a certain domain*/
extern OSStatus PCIDomainGetDeviceData(UInt32 Domain, ItemCount reqeustItemCount, ItemCount *totalItemCountPtr, PCIIOIteratorData *List);
/* get all pci devices belonging to a certain bus*/
extern OSStatus PCIBusNumberGetDeviceData(UInt32 BusNumber, ItemCount reqeustItemCount, ItemCount *totalItemCountPtr, PCIIOIteratorData *List);
/* get a pci devices by its config address*/
extern OSStatus PCIConfigAddressGetDeviceData(PCIConfigAddress ConfigAddress, ItemCount reqeustItemCount, ItemCount *totalItemCountPtr, PCIIOIteratorData *List);
/* bridge interrupt handler call*/
extern OSStatus PCILookupParentMember(InterruptSetID theSet, InterruptSetMember *theParentSetMember)
TWOWORDINLINE(0x700B, 0xAAF4);
/* plugin access to interrupt disable calls*/
extern InterruptState PCIDisableInterrupts(void );
extern void PCIRestoreInterrupts(InterruptState theState);
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import off
#endif
#ifdef __cplusplus
}
#endif
#endif /* __PCIKERNEL__ */